package util;
import java.util.HashSet;



public class Observable {

	private HashSet<IObserver> observers;
	public Observable(){
		observers= new HashSet<IObserver>();
	}
	public void addObserver(IObserver o){
		observers.add(o);
	}
	public void deleteObserver(Object o){
		observers.remove(o);
	}
	public void notifyObservers(Object o){
		for(IObserver iObserver : observers){
			iObserver.update(this,o);
		}
		
	}
}
